<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    // 颜色
    // 内存
    // 处理器

    function CreatePhone(color, cache, cpu){
        this.color = color;
        this.cache = cache;
        this.cpu = cpu;
    }

    CreatePhone.prototype.call = function(){
        console.log("打电话")
    }
    CreatePhone.prototype.game = function(){
        console.log("玩游戏")
    }

    var p1 = new CreatePhone("白色", "64G", "4核")
    var p2 = new CreatePhone("白色", "256G", "8核")
    var p3 = new CreatePhone("钛合金", "256T", "80核")
    console.log(p1)
    console.log(p2)
    console.log(p3)
    console.log(p1 === p2)
    console.log(p3 === p2)
    console.log(p1 === p3)


    // 类是实例的抽象化

    // 实例是类的具象化



</script>
</html>